// let util = require('utils/util.js');
App({
  onLaunch: function () {

  },

  globalData: {
    userInfo: null,
    domain : 'https://www.ittest008.com/',
  },
  setToken(token){
    this.setStorage("token", token)
  },
  getToken(){
    return this.getStorage("token");
  },
  setUserId(userId) {
    this.setStorage("userId", userId)
  },
  getUserId() {
    return this.getStorage("userId");
  },
  setRole(role) {
    this.setStorage("role", role)
  },
  getRole() {
    return this.getStorage("role");
  },
  setSessionTable(sessionTable) {
    this.setStorage("sessionTable", sessionTable)
  },
  getSessionTable() {
    return this.getStorage("sessionTable");
  },
  setAdminName(adminName) {
    this.setStorage("adminName", adminName)
  },
  getAdminName() {
    return this.getStorage("adminName");
  },
  setStorage(key, data){
    wx.setStorage({
      'key': key,
      'data': data
    })
  },
  getStorage(key){
    return wx.getStorageSync(key)
  },  
})